package com.codechuan.hallo.thread;

import com.codechuan.hallo.dto.SuccessOrder;

public class RobOrderThread implements Runnable{

   SynContainer synContainer;

    public RobOrderThread(SynContainer synContainer) {
        this.synContainer = synContainer;
    }

    @Override
    public void run() {
        while (true){
            SuccessOrder successOrder = this.synContainer.getSuccessOrder();
            if (successOrder != null){
                System.out.println("订单是:" + successOrder);
            }
        }
    }
}
